home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / ucopy_11.zip / UCOPY.TXT < prev   
Text File  |  1994-03-17  |  11KB  |  241 lines

  1.     UCOPY.EXE
  2.     =========                       (c) Copyright M N Summerfield 1994
  3.  
  4.  
  5.     License
  6.     -------
  7. This program is 'free software' in the sense that you may use it and
  8. copy it freely. The author retains copyright to the program however. You
  9. may not use this program as part of a program that is not 'free
  10. software'. You may not sell this program, although you may charge a
  11. (small) fee for copying and postage if you are a software distributor.
  12. This program comes without warranty of any kind: use it at your own risk.
  13.  
  14.  
  15.     Purpose
  16.     -------
  17. UCOPY is designed to copy your files. It is particularly useful for
  18. backing up a whole tree of directories, since it can recreate or extend a
  19. directory tree at the destination, and will only copy new and newer (i.e. 
  20. later time/date stamped) files.
  21. Another important use is to transfer files between two different
  22. machines, 'equalising' their data.
  23.  
  24.  
  25.     One Line Summary
  26.     ----------------
  27. Copies new & updated files skipping unchanged ones.
  28.  
  29.  
  30.     Example
  31.     -------
  32. Suppose you have a directory tree on your hard disk where you keep files
  33. related to various projects, the root of which is called PROJECTS. You 
  34. could back this structure up as follows:
  35.     
  36.         UCOPY PROJECTS A: /S
  37.  
  38. This will copy all the files in PROJECTS and its subdirectories onto the
  39. A: drive, recreating or extending the directory structure as necessary.
  40. Whenever you want to back up your PROJECTS tree, you can type the same
  41. command, not worrying about the fact that you may only have changed a
  42. few files since you last backed up, because UCOPY will not copy
  43. unchanged files, only new or changed ones. (Further examples are given
  44. later.)
  45.  
  46.  
  47.     Typical Use
  48.     -----------
  49. In practice I keep one floppy disk for each tree in which I keep data,
  50. so backing up at the end of the day is a snap using a batch file which
  51. simply prompts me for the PROJECTS disk, the PERSONAL disk, and so on,
  52. and uses UCOPY to copy just those files that have been added or changed
  53. since the last backup. (If I have a directory which contains more than
  54. about 1 Mb I split it into two or more subdirectories, so that I can
  55. always mirror one subdirectory to one floppy disk.) For those who use
  56. an on-the-fly disk compressor/decompressor, UCOPY is particularly
  57. useful, since you can easily mirror directories of over 2 Mb onto a
  58. single floppy disk.
  59.  
  60. Another use is to copy all your data files between two different 
  61. machines, in the following way:
  62.  
  63.     copying from the office machine onto a disk to take home:-
  64.         UCOPY OFFICDAT\*.DOC A: /S
  65.     now copy from the disk to the home machine:-
  66.         UCOPY A: HOMEDAT /S
  67.  
  68.     copying from the home machine onto the disk to take to the office:-
  69.         UCOPY HOMEDAT\*.DOC A: /S
  70.     now copy from the disk to the office machine:-
  71.         UCOPY A: OFFICDAT /S
  72.  
  73.     Note that in the above scenario, only *.DOC files are transferred: 
  74.     if no wild-cards had been used all files would have been copied. But
  75.     the two most important things to note are firstly by using the /S 
  76.     switch, all the subdirectories are searched (and recreated on the 
  77.     floppy disk where necessary), and secondly, only new files and the
  78.     most recently updated files are transferred: files which are unchanged
  79.     are not copied. Furthermore, old files do not overwrite more up-to-
  80.     date files.
  81.  
  82.  
  83.     Description
  84.     -----------
  85. Entering UCOPY /? will display the following help screen:
  86.  
  87.     UCOPY <source> <dest> [/S] [/M] [/T] [/B<n>] [/Q] [/A] [/?]
  88. <source> Source may be one or a combination of: a drive, a path, a filename.
  89.     If only a drive, the curent path is assumed, and the filename is *.*.
  90.     If only a path, the current drive is assumed, and the filename is *.*.
  91.     If only a filename, the current drive and current path are assumed.
  92.     e.g. ., C:, *.*, FILENAME.EXT, C:DIR, DIR\*.W??, SUBDIR, SUBDIR\SUBDIR.
  93. <dest> Dest may be a drive, path, or both, e.g. ., A:\, A:\DIR\SUBDIR.
  94. /S  Subdir. Recursively copy from and into subdirs as necessary, creating
  95.     subdirs under <dest> as required.
  96. /M  Move. Delete source files & empty subdirs after skipping or copying.
  97. /T  Time/date. Copy using the time/date of copying as the time/date of the
  98.     copied file(s), instead defaulting to the original file(s) time/dates.
  99. /B<n> Buffer. Specify the size of buffer which UCOPY uses in Kbytes.
  100.     <n> is an integer between 1 and 30 which defaults to 30.
  101. /Q  Quiet. Do not display any 'skipping', 'copying', etc messages.
  102. /A  Alarm. Beep once for successful run, twice on error.
  103. /?  Help. Print this help screen.
  104. UCOPY Copies new and newer (i.e. later time/date) source files from <source>
  105. to <dest> that match the source filename (which may include wildcards).
  106. UCOPY can work recursively, (with the /S switch), thus mirroring entire
  107. directory trees from <source> to <dest>. (See UCOPY.TXT for full details.)
  108.     UCOPY v1.1 Standard Edition (c) M N Summerfield 1994.
  109.  
  110.  
  111.     Copying Logic
  112.     -------------
  113.     .   If a file with the same name as the source file already exists
  114.         at the destination and the time and date of both files is
  115.         the same, (or the destination is newer), the source file will
  116.         not be copied. (This is 'skipping'.)
  117.     .   If a file with the same name as the source file already exists
  118.         at the destination, but the source file is a later version
  119.         the source file will be copied over the file of the same name
  120.         at the destination. (This is 'copying'.)
  121.     .   If the /M (move) switch has been used, UCOPY will delete the
  122.         original file after it has skipped or copied.
  123.     .   If the /S (subdirectories) switch is used, UCOPY will copy into 
  124.         subdirectories which are rooted in the destination to match
  125.         the directory structure of the source file(s), creating 
  126.         directories at the destination as required, and copying files
  127.         into the matching subdirectories so that the source and
  128.         destination directory tree structures match as do their file
  129.         contents. (If the /M (move) switch is also used source file(s)
  130.         will be deleted after copying or skipping throughout the
  131.         directory tree, and so will empty source subdirectories.)
  132.     .   The <dest> path must exist, but if a subdirectory under <dest>
  133.         does not exist, UCOPY will create it, if the /S switch has been
  134.         used.
  135.     .   If the source is described as *.* and the /S switch is used then
  136.         at the end of the copying process both the source and
  137.         destination directory trees will be identical is structure and
  138.         content (unless the destination has additional files to the source).
  139.         In all other circumstances there will not be an exact match, since 
  140.         if the *.* pattern is not given, some files may not be copied (since 
  141.         their names do not match the pattern), or if the /S switch is not 
  142.         used and there are subdirectories, their contents will be ignored.
  143.  
  144.  
  145.     Messages
  146.     --------
  147. If the /Q switch is not used UCOPY will print a message on the screen
  148. for each file and subdirectory processed. Error messages are printed
  149. regardless of the /Q switch. The messages are shown below:
  150.  
  151.     Skipping <source>
  152.     Copying  <source> to <destination>
  153.     Deleting <source>
  154.     Created  <directory>
  155.     Removed  <directory>
  156.  
  157. If UCOPY cannot continue due to an error condition it will print an
  158. appropriate message, and usually the name of the file or directory
  159. being processed, and return a corresponding ERRORLEVEL value to DOS.
  160. The 'fatal' error messages, (with their ERRORLEVEL) are shown below:
  161.  
  162.     No more free memory (1)
  163.     Internal error: contact your supplier (2)
  164.     Source or destination path not given (3)
  165.     Source path invalid or not found (4)
  166.     Destination path invalid or not found (5)
  167.     Destination is not a directory (6)
  168.     Too many files open (7)
  169.     Cannot open destination file: permission denied (8)
  170.     Failed to open file (9)
  171.     Failed to create sub-directory (10)
  172.     Failed to read destination attribute(s) (11